package org.noranj.idnt.shared.dto;

import java.io.Serializable;

import javax.jdo.annotations.EmbeddedOnly;
import javax.jdo.annotations.NotPersistent;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;

/**
 * NOTE: This is a sample of classes that are EmbededOnly.
 * 
 * This class stores an address.
 * 
 * This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY.
 * See http://www.noranj.org for further information.
 *
 * @author
 * @change 
 *  12-05-26 added to string 
 */
@PersistenceCapable(detachable="true")
@EmbeddedOnly
public class AddressDTO implements Serializable{
  
   @NotPersistent
   private static final long serialVersionUID = 1867687879741150978L;

    @Persistent
    private String streetAddress;

    @Persistent
    private String city;

    @Persistent
    private String stateOrProvince;

    @Persistent
    private String postalCode;

    public String getStreetAddress() {
      return streetAddress;
    }

    public void setStreetAddress(String streetAddress) {
      this.streetAddress = streetAddress;
    }

    public String getCity() {
      return city;
    }

    public void setCity(String city) {
      this.city = city;
    }

    public String getStateOrProvince() {
      return stateOrProvince;
    }

    public void setStateOrProvince(String stateOrProvince) {
      this.stateOrProvince = stateOrProvince;
    }

    public String getPostalCode() {
      return postalCode;
    }

    public void setPostalCode(String postalCode) {
      this.postalCode = postalCode;
    }
    
    public String toString() {
      StringBuilder str = new StringBuilder();
      str.append("streetAddress[");
      str.append(streetAddress);
      str.append("] city[");
      str.append(city);
      str.append("] state/province[");
      str.append(stateOrProvince);
      str.append("]postalcode[");
      str.append(postalCode);
      str.append("]");
      return(str.toString());
    
    }

}
